<!-- Sofija Puric 6/08 -->
<?php
    require '../../pages/db.php';
    $con=dbConnect("sib");

    $eventid=$_GET["eventid"];

    $name=$_POST["name"];
    $location=$_POST["location"];
    $date_from=$_POST["date_from"];
    $date_to=$_POST["date_to"];
    $brief=$_POST["brief"];
    $full=$_POST["full"];
    $link=$_POST["link"];
    $url=$_POST["url"];
    $alt=$_POST["alt"];

    $sql="UPDATE event
          SET Name='$name', Location='$location', DateFrom='$date_from', DateTo='$date_to', BriefDescription='$brief',
          FullDescription='$full', Link='$link', Url='$url', Alt='$alt' WHERE IDEvent='$eventid'";

    $result = mysql_query($sql, $con);
    if (!$result) {
        die('Error: ' . mysql_error());
    }
    else header('Location: ../events-admin.php');


    mysql_close($con);

?>
